<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <meta name="google-site-verification" content="k9iQUbEI9rWq3xYeh63ATztKdkthC4dNRHV_25maJ3Q" />
  <title>从编写到发布laravel扩展 | Taylor&#39;s Learning Diary</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="工具准备 创建开源项目三工具github、packageist、composer  123github: git仓库，是用于存放源代码的地方packagist: 用于发布github上的扩展程序或者项目composer: 用于使用代码的工具">
<meta name="keywords" content="laravel,composer,packageist">
<meta property="og:type" content="article">
<meta property="og:title" content="从编写到发布laravel扩展">
<meta property="og:url" content="https://upeng.github.io/blog/2016/10/11/publish-laravel-package/index.html">
<meta property="og:site_name" content="Taylor&#39;s Learning Diary">
<meta property="og:description" content="工具准备 创建开源项目三工具github、packageist、composer  123github: git仓库，是用于存放源代码的地方packagist: 用于发布github上的扩展程序或者项目composer: 用于使用代码的工具">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://ww2.sinaimg.cn/mw690/006iFiRLjw1f8o4ehp6l9j31c30kejve.jpg">
<meta property="og:image" content="http://ww2.sinaimg.cn/mw690/006iFiRLjw1f8o4eibz58j31j50u9gsy.jpg">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4eizjdvj31k70ra7bl.jpg">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4ejjp7zj30wk0d8jsx.jpg">
<meta property="og:image" content="http://ww2.sinaimg.cn/mw690/006iFiRLjw1f8o4ek6aagj30wp0epmzr.jpg">
<meta property="og:image" content="http://ww1.sinaimg.cn/mw690/006iFiRLjw1f8o4ektd7qj318o0hg77p.jpg">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4elc6eej31600q6wiv.jpg">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4em26svj30n10d5myx.jpg">
<meta property="og:image" content="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4emqsblj312x0nv446.jpg">
<meta property="og:updated_time" content="2017-09-28T15:22:56.450Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="从编写到发布laravel扩展">
<meta name="twitter:description" content="工具准备 创建开源项目三工具github、packageist、composer  123github: git仓库，是用于存放源代码的地方packagist: 用于发布github上的扩展程序或者项目composer: 用于使用代码的工具">
<meta name="twitter:image" content="http://ww2.sinaimg.cn/mw690/006iFiRLjw1f8o4ehp6l9j31c30kejve.jpg">
  
    <link rel="alternate" href="/atom.xml" title="Taylor&#39;s Learning Diary" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/blog/css/style.css">
  

</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/blog/" id="logo">Taylor&#39;s Learning Diary</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/blog/">Home</a>
        
          <a class="main-nav-link" href="/blog/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://upeng.github.io/blog"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-publish-laravel-package" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/blog/2016/10/11/publish-laravel-package/" class="article-date">
  <time datetime="2016-10-11T15:08:11.000Z" itemprop="datePublished">2016-10-11</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/blog/categories/PHP/">PHP</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      从编写到发布laravel扩展
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h3 id="工具准备"><a href="#工具准备" class="headerlink" title="工具准备"></a><a href="#工具准备" title="工具准备"></a>工具准备</h3><blockquote>
<p>创建开源项目三工具github、packageist、composer</p>
</blockquote>
<figure class="highlight avrasm"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="symbol">github:</span> git仓库，是用于存放源代码的地方</div><div class="line"><span class="symbol">packagist:</span> 用于发布github上的扩展程序或者项目</div><div class="line"><span class="symbol">composer:</span> 用于使用代码的工具</div></pre></td></tr></table></figure>
<a id="more"></a>
<p><code>github-&gt;packagist-&gt;composer</code></p>
<ol>
<li>怎样写一个laravel扩展，发布到packagist，提供composer方法</li>
<li>git命令熟悉</li>
</ol>
<h3 id="写laravel扩展"><a href="#写laravel扩展" class="headerlink" title="写laravel扩展"></a><a href="#写laravel扩展" title="写laravel扩展"></a>写laravel扩展</h3><h4 id="本地编写"><a href="#本地编写" class="headerlink" title="本地编写"></a><a href="#本地编写" title="本地编写"></a>本地编写</h4><p>本地编写package，完成后，在laravel根目录下的composer.json中添加一行<br><code>&quot;Upstriving\\Curd\\&quot;: &quot;package/upstriving/curd/src&quot;</code></p>
<figure class="highlight xquery"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line"><span class="string">"autoload"</span>: &#123;</div><div class="line">       <span class="string">"classmap"</span>: [</div><div class="line">           <span class="string">"database"</span></div><div class="line">       ],</div><div class="line">       <span class="string">"psr-4"</span>: &#123;</div><div class="line">           <span class="string">"App\\"</span>: <span class="string">"app/"</span>,</div><div class="line">           <span class="string">"Upstriving\\Curd\\"</span>: <span class="string">"package/upstriving/curd/src"</span></div><div class="line">       &#125;</div><div class="line">   &#125;,</div></pre></td></tr></table></figure>
<p>添加之后<code>composer dump-autoload</code>将之加到路由中<br><code>php artisan tinker</code>测试</p>
<figure class="highlight excel"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line">&gt;&gt;&gt; app('sqladmin')</div><div class="line">=&gt; Upstriving\Curd\SQLAdmin &#123;#<span class="number">629</span>&#125;</div><div class="line">&gt;&gt;&gt; app('sqladmin')-&gt;makeSelect('user','id,name',['id'=&gt;<span class="number">2</span>]);</div><div class="line">=&gt; [</div><div class="line">     <span class="string">"sql"</span> =&gt; <span class="string">"select id,name from user where id=?"</span>,</div><div class="line">     <span class="string">"data"</span> =&gt; [</div><div class="line">       <span class="number">2</span>,</div><div class="line">     ],</div><div class="line">   ]</div><div class="line">&gt;&gt;&gt; app('sqladmin')-&gt;makeDelete('user',['name'=&gt;'upfriend'])</div><div class="line">=&gt; [</div><div class="line">     <span class="string">"sql"</span> =&gt; <span class="string">"delete from user where `name`=?"</span>,</div><div class="line">     <span class="string">"data"</span> =&gt; [</div><div class="line">       <span class="string">"upfriend"</span>,</div><div class="line">     ],</div><div class="line">   ]</div></pre></td></tr></table></figure>
<h4 id="生成composer-json"><a href="#生成composer-json" class="headerlink" title="生成composer.json"></a><a href="#生成composer-json" title="生成composer.json"></a>生成composer.json</h4><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div></pre></td><td class="code"><pre><div class="line">composer init</div><div class="line">This command will guide you through creating your composer.json config.</div><div class="line"></div><div class="line">Package name (&lt;vendor&gt;/&lt;name&gt;) [yupeng6/curd]: upstriving/curd</div><div class="line">Description []: assemble sql statements quickly</div><div class="line">Author [upeng &lt;825415473@qq.com&gt;, n <span class="keyword">to</span> skip]:</div><div class="line">Minimum Stability []: dev</div><div class="line">Package<span class="built_in"> Type </span>(e.g. library, project, metapackage, composer-plugin) []:</div><div class="line">License []: MIT</div><div class="line"></div><div class="line">Define your dependencies.</div><div class="line"></div><div class="line">Would you like <span class="keyword">to</span> define your dependencies (require) interactively [<span class="literal">yes</span>]? <span class="literal">no</span></div><div class="line">Would you like <span class="keyword">to</span> define your dev dependencies (require-dev) interactively [<span class="literal">yes</span>]? <span class="literal">no</span></div><div class="line"></div><div class="line">&#123;</div><div class="line">    <span class="string">"name"</span>: <span class="string">"upstriving/curd"</span>,</div><div class="line">    <span class="string">"description"</span>: <span class="string">"assemble sql statements quickly"</span>,</div><div class="line">    <span class="string">"license"</span>: <span class="string">"MIT"</span>,</div><div class="line">    <span class="string">"authors"</span>: [</div><div class="line">        &#123;</div><div class="line">            <span class="string">"name"</span>: <span class="string">"upeng"</span>,</div><div class="line">            <span class="string">"email"</span>: <span class="string">"825415473@qq.com"</span></div><div class="line">        &#125;</div><div class="line">    ],</div><div class="line">    <span class="string">"minimum-stability"</span>: <span class="string">"dev"</span>,</div><div class="line">    <span class="string">"require"</span>: &#123;&#125;</div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="keyword">Do</span> you confirm generation [<span class="literal">yes</span>]? <span class="literal">yes</span></div></pre></td></tr></table></figure>
<h4 id="生成composer-json-1"><a href="#生成composer-json-1" class="headerlink" title="生成composer.json"></a><a href="#生成composer-json-1" title="生成composer.json"></a>生成composer.json</h4><blockquote>
<p>添加autoload</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="meta">&gt;</span><span class="bash"> <span class="string">"autoload"</span>: &#123;</span></div><div class="line"><span class="meta">&gt;</span><span class="bash">     <span class="string">"psr-4"</span>: &#123;</span></div><div class="line"><span class="meta">&gt;</span><span class="bash">          <span class="string">"Upstriving\\Curd\\"</span>: <span class="string">"src/"</span></span></div><div class="line"><span class="meta">&gt;</span><span class="bash">     &#125;</span></div><div class="line"><span class="meta">&gt;</span><span class="bash"> &#125;</span></div><div class="line"><span class="meta">&gt;</span><span class="bash"> </span></div><div class="line"><span class="meta">&gt;</span><span class="bash"></span></div></pre></td></tr></table></figure>
</blockquote>
<h4 id="推送到github"><a href="#推送到github" class="headerlink" title="推送到github"></a><a href="#推送到github" title="推送到github"></a>推送到github</h4><blockquote>
<p>当前扩展目录下执行</p>
</blockquote>
<figure class="highlight dockerfile"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">git init</div><div class="line">git <span class="keyword">add</span><span class="bash"> .</span></div><div class="line"><span class="bash">git commit -m <span class="string">'add new package'</span></span></div></pre></td></tr></table></figure>
<p>github手动创建一个<code>repository(laravel-sqladmin)</code><br>在本地目录下，复制两行命令并执行，将本地代码推送到github</p>
<figure class="highlight stylus"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">git remote add origin git@github<span class="selector-class">.com</span>:upeng/laravel-sqladmin.git</div><div class="line">git push -u origin master</div></pre></td></tr></table></figure>
<p>新增readme.md</p>
<h4 id="通过github的package服务发布到packagist中"><a href="#通过github的package服务发布到packagist中" class="headerlink" title="通过github的package服务发布到packagist中"></a><a href="#通过github的package服务发布到packagist中" title="通过github的package服务发布到packagist中"></a>通过github的package服务发布到packagist中</h4><p>供其他开发者通过composer使用<br>登录<code>https://packagist.org/</code>,<br><img src="http://ww2.sinaimg.cn/mw690/006iFiRLjw1f8o4ehp6l9j31c30kejve.jpg" alt="此处输入图片的描述"><br>拿到token值，回到<code>github/larvavel-sqladmin/settings/integrations &amp; service</code><br>执行<code>add service/packagist</code><br><img src="http://ww2.sinaimg.cn/mw690/006iFiRLjw1f8o4eibz58j31j50u9gsy.jpg" alt="此处输入图片的描述"><br>输入用户名user和token(从packagist中获取)<br>成功之后如下<br><img src="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4eizjdvj31k70ra7bl.jpg" alt="此处输入图片的描述"></p>
<p>再次回到packagist中，submit刚才那个repository地址<br><img src="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4ejjp7zj30wk0d8jsx.jpg" alt="此处输入图片的描述"><br><img src="http://ww2.sinaimg.cn/mw690/006iFiRLjw1f8o4ek6aagj30wp0epmzr.jpg" alt="此处输入图片的描述"><br><img src="http://ww1.sinaimg.cn/mw690/006iFiRLjw1f8o4ektd7qj318o0hg77p.jpg" alt="此处输入图片的描述"></p>
<p>提示这个package is not auto_updated，需要到github中设置一下<br>github/larvavel-sqladmin/settings/integrations &amp; service/packagist<br>点击test service，<br><img src="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4elc6eej31600q6wiv.jpg" alt="此处输入图片的描述"></p>
<p>如果显示<br><code>Okay, the test payload is on its way.</code><br>说明自动更新没有问题，再次回到packagist发现刚刚的提示已经不见了<br><img src="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4em26svj30n10d5myx.jpg" alt="此处输入图片的描述"></p>
<h4 id="修改或新增文件，观察是否实时更新到packagist"><a href="#修改或新增文件，观察是否实时更新到packagist" class="headerlink" title="修改或新增文件，观察是否实时更新到packagist"></a><a href="#修改或新增文件，观察是否实时更新到packagist" title="修改或新增文件，观察是否实时更新到packagist"></a>修改或新增文件，观察是否实时更新到packagist</h4><blockquote>
<p>新增readme.file</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="meta">&gt;</span><span class="bash"> git add .</span></div><div class="line"><span class="meta">&gt;</span><span class="bash"> git commit -m <span class="string">''</span></span></div><div class="line"><span class="meta">&gt;</span><span class="bash"> git push</span></div><div class="line"><span class="meta">&gt;</span><span class="bash"> </span></div><div class="line"><span class="meta">&gt;</span><span class="bash"></span></div></pre></td></tr></table></figure>
<p>增加版本号</p>
</blockquote>
<p><code>git tag 1.0 -a</code><br>输入: release version 1.0<br><code>git push --tags</code><br>发现github上多了一个版本号,packagist版本也随之更新<br><img src="http://ww3.sinaimg.cn/mw690/006iFiRLjw1f8o4emqsblj312x0nv446.jpg" alt="此处输入图片的描述"></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://upeng.github.io/blog/2016/10/11/publish-laravel-package/" data-id="cj8x7818w002kgwp4ypvhvheb" class="article-share-link">Share</a>
      
        <a href="https://upeng.github.io/blog/2016/10/11/publish-laravel-package/#disqus_thread" class="article-comment-link">留言</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/composer/">composer</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/laravel/">laravel</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/packageist/">packageist</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/blog/2016/10/12/static/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          静态方法和静态成员变量
        
      </div>
    </a>
  
  
    <a href="/blog/2016/09/11/vim/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">vim学习笔记</div>
    </a>
  
</nav>

  
</article>


<section id="comments">
  <div id="disqus_thread">
    <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  </div>
</section>
</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/blog/categories/Linux/">Linux</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/MySQL/">MySQL</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/PHP/">PHP</a><span class="category-list-count">15</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/Thinking/">Thinking</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/其他/">其他</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/前端/">前端</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/数据库范式/">数据库范式</a><span class="category-list-count">1</span></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">标签云</h3>
    <div class="widget tagcloud">
      <a href="/blog/tags/CI/" style="font-size: 10px;">CI</a> <a href="/blog/tags/JQuery/" style="font-size: 10px;">JQuery</a> <a href="/blog/tags/Mac/" style="font-size: 13.33px;">Mac</a> <a href="/blog/tags/MySQL/" style="font-size: 10px;">MySQL</a> <a href="/blog/tags/awk/" style="font-size: 10px;">awk</a> <a href="/blog/tags/bash/" style="font-size: 10px;">bash</a> <a href="/blog/tags/composer/" style="font-size: 10px;">composer</a> <a href="/blog/tags/eloquent/" style="font-size: 10px;">eloquent</a> <a href="/blog/tags/hexo/" style="font-size: 10px;">hexo</a> <a href="/blog/tags/idempotence/" style="font-size: 10px;">idempotence</a> <a href="/blog/tags/item/" style="font-size: 10px;">item</a> <a href="/blog/tags/laravel/" style="font-size: 20px;">laravel</a> <a href="/blog/tags/linux/" style="font-size: 16.67px;">linux</a> <a href="/blog/tags/mac/" style="font-size: 10px;">mac</a> <a href="/blog/tags/memcacheq/" style="font-size: 10px;">memcacheq</a> <a href="/blog/tags/mysql/" style="font-size: 16.67px;">mysql</a> <a href="/blog/tags/nc/" style="font-size: 10px;">nc</a> <a href="/blog/tags/packageist/" style="font-size: 10px;">packageist</a> <a href="/blog/tags/php/" style="font-size: 13.33px;">php</a> <a href="/blog/tags/sed/" style="font-size: 10px;">sed</a> <a href="/blog/tags/shell/" style="font-size: 10px;">shell</a> <a href="/blog/tags/static/" style="font-size: 10px;">static</a> <a href="/blog/tags/thinking/" style="font-size: 13.33px;">thinking</a> <a href="/blog/tags/tmux/" style="font-size: 10px;">tmux</a> <a href="/blog/tags/vagrant/" style="font-size: 10px;">vagrant</a> <a href="/blog/tags/validator/" style="font-size: 10px;">validator</a> <a href="/blog/tags/vim/" style="font-size: 10px;">vim</a> <a href="/blog/tags/vuejs/" style="font-size: 10px;">vuejs</a> <a href="/blog/tags/zephir/" style="font-size: 10px;">zephir</a> <a href="/blog/tags/zsh/" style="font-size: 10px;">zsh</a> <a href="/blog/tags/设计模式/" style="font-size: 13.33px;">设计模式</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2017/10/">十月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2017/09/">九月 2017</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/12/">十二月 2016</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/11/">十一月 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/10/">十月 2016</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/09/">九月 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/08/">八月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/07/">七月 2016</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/06/">六月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/05/">五月 2016</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/04/">四月 2016</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/02/">二月 2016</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2016/01/">一月 2016</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2015/10/">十月 2015</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2015/08/">八月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2015/07/">七月 2015</a><span class="archive-list-count">1</span></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/blog/2017/10/18/laravel-validator/">Laravel Validator自定义参数验证规则</a>
          </li>
        
          <li>
            <a href="/blog/2017/09/28/linux-sed/">linux常用命令之sed</a>
          </li>
        
          <li>
            <a href="/blog/2017/09/27/shell-script-learning/">shell脚本由点到面学习总结</a>
          </li>
        
          <li>
            <a href="/blog/2017/09/14/laravel-eloquent-index/">Eloquent ORM多个and和or条件查询</a>
          </li>
        
          <li>
            <a href="/blog/2017/09/10/Linux压缩解压缩命令-index/">Linux常用压缩解压缩命令</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2017 Tayloryu<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/blog/" class="mobile-nav-link">Home</a>
  
    <a href="/blog/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    
<script>
  var disqus_shortname = 'tayloryu';
  
  var disqus_url = 'https://upeng.github.io/blog/2016/10/11/publish-laravel-package/';
  
  (function(){
    var dsq = document.createElement('script');
    dsq.type = 'text/javascript';
    dsq.async = true;
    dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  })();
</script>


<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/blog/fancybox/jquery.fancybox.css">
  <script src="/blog/fancybox/jquery.fancybox.pack.js"></script>


<script src="/blog/js/script.js"></script>
  </div>
</body>
</html>